/*
 * @Author: 1453937336@qq.com 1453937336@qq.com
 * @Date: 2024-05-24 11:18:24
 * @LastEditors: 1453937336@qq.com 1453937336@qq.com
 * @LastEditTime: 2024-06-12 09:56:06
 * @FilePath: \itforce-hris\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElIcons from "@element-plus/icons-vue";
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';
import 'virtual:svg-icons-register'
// import './assets/icons' // icon
import SvgIcon from "./components/SvgIcon/SvgIcon.vue";
import plugins from './plugins' // plugins
import validate from '@/utils/validate';
// 国际化
import locale from './utils/i18n'
import "./actions";
import 'animate.css';
import directive from '@/directive/index' // directive
import itforceLoading from './components/itforce-loading/itforce-loading.vue';
import mitt from 'mitt';
// import hooks from "@/hooks";

// 注册微应用
// const app = registerMicroApps(apps)
// import "amfe-flexible/index.js";

const app = createApp(App);
// directive(app)
for (const name in ElIcons) {
  app.component(name, (ElIcons as any)[name]);
}

app.component('svg-icon', SvgIcon);
app.config.globalProperties.$validate = validate
app.config.globalProperties.$mitt = mitt()
// app.config.globalProperties.$hooks = hooks
// app.config.globalProperties.$ifHr = false

app.component('itforce-loading', itforceLoading);
app
  .use(router)
  .use(store)
  // .use(hooks)
  .use(locale)
  .use(plugins)
  .use(ElementPlus)
  .use(directive)
  .use(Antd)
  .mount("#app");
